<script lang="ts" setup>
const props = defineProps({
  active: {
    type: Number,
    default: 1
  }
})
</script>

<template>
  <div class="step">
    <div class="step-item">
      <div class="step-num" :class="{ active: props.active === 1 }">1</div>
      <p>密码重置</p>
    </div>
    <!-- <div class="step-item">
      <div class="step-num" :class="{ active: props.active === 2 }">2</div>
      <p>身份验证</p>
    </div>
    <div class="step-item">
      <div class="step-num" :class="{ active: props.active === 3 }">3</div>
      <p>密码重置</p>
    </div> -->
    <div class="step-item">
      <div class="step-num" :class="{ active: props.active === 2 }">2</div>
      <p>结果</p>
    </div>
  </div>
</template>

<style lang="scss" scoped>
.step {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 480px;
  .step-item {
    text-align: center;
    margin-right: 190px;
    position: relative;
    min-width: 70px;
    &:last-child {
      margin-right: 0;
      &::after {
        display: none;
      }
    }
    .step-num {
      width: 36px;
      height: 36px;
      border: 1px solid #C2CBDD;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      font-weight: 500;
      font-size: 18px;
      color: #C2CBDD;
      margin: 0 auto;
      &.active {
        color: #FFFFFF;
        background: #E12010;
        border-color: #E12010;
      }
    }
    p {
      margin-top: 10px;
      font-weight: 400;
      font-size: 14px;
      color: #202949;
    }
    &::after {
      position: absolute;
      right: -176px;
      top: 17px;
      content: "";
      display: block;
      width: 162px;
      height: 1px;
      background: #c2cbdd;
      border-radius: 1px;
    }
  }
}
</style>
